<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //1. 进入全局执行上下文
        var a = 10
        var bar = function(x) {
            var b = 5
            foo(x + b) //3. 进入foo执行上下文           
        }
        var foo = function(y) {
            var c = 5
            console.log(a + c + y)
        }
        bar(10) //2. 进入bar函数执行上下文
    </script>
</body>

</html>